﻿using Autodesk.AutoCAD.ApplicationServices;
using Autodesk.AutoCAD.Runtime;
using System.Reflection;
using Application = Autodesk.AutoCAD.ApplicationServices.Application;
[assembly: CommandClass(typeof(Netloadx.Class1))]

namespace Netloadx
{
    public class Class1
    {
        [CommandMethod("NetLoadx")]
        public void NetLoadX()
        {
            string file_dir = @"D:\studay\csharp\Work\ucd_site_tools\ChangDiTools\bin\Debug\ChangDiTools.dll";
            byte[] btffer = System.IO.File.ReadAllBytes(file_dir);
            Assembly assembly = Assembly.Load(btffer);
            Document doc = Application.DocumentManager.MdiActiveDocument;
            doc.SendStringToExecute("ttt ", true, false, false);
            doc.SendStringToExecute("._zoom _e ", true, false, false);//注意空格
        }
    }
}
